﻿<views:MvxWpfView 
	x:Class="Sidvall.FileSystemManager.UI.Wpf.Views.CleanConfigView"
	xmlns:views="clr-namespace:MvvmCross.Wpf.Views;assembly=MvvmCross.Wpf"
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
	xmlns:Converters="clr-namespace:Sidvall.UI.Wpf.Converters;assembly=Sidvall.UI.Wpf"
	xmlns:vms="clr-namespace:Sidvall.FileSystemManager.UI.ViewModels;assembly=Sidvall.FileSystemManager.UI"
	xmlns:Controls="clr-namespace:Sidvall.FileSystemManager.UI.Wpf.Controls"
	mc:Ignorable="d" 
	d:DesignHeight="300" d:DesignWidth="300">

	<views:MvxWpfView.Resources>
		<Converters:InverseBooleanConverter x:Key="InverseBooleanConverter"/>
	</views:MvxWpfView.Resources>

	<Grid d:DataContext="{d:DesignInstance IsDesignTimeCreatable=True, Type={x:Type vms:CleanConfigViewModel}}" IsEnabled="{Binding IsBusy, Converter={StaticResource InverseBooleanConverter}}">
		<Grid.RowDefinitions>
			<RowDefinition Height="Auto" />
			<RowDefinition Height="Auto" />
			<RowDefinition />
			<RowDefinition Height="Auto" />
		</Grid.RowDefinitions>

		<Controls:HeaderControl HeaderCaption="Clean" HeaderHorizontalContentAlignment="Center" FontSize="14" FontWeight="Bold"/>

		<Grid Grid.Row="1">
			<Grid.ColumnDefinitions>
				<ColumnDefinition />
				<ColumnDefinition Width="Auto" />
			</Grid.ColumnDefinitions>

			<Grid Grid.Column="0">
				<Grid.RowDefinitions>
					<RowDefinition Height="Auto" />
					<RowDefinition Height="Auto" />
					<RowDefinition Height="Auto" />
					<RowDefinition Height="Auto" />
					<RowDefinition Height="Auto" />
					<RowDefinition Height="Auto" />
					<RowDefinition Height="Auto" />
					<RowDefinition Height="Auto" />
					<RowDefinition />
				</Grid.RowDefinitions>
				<Grid.ColumnDefinitions>
					<ColumnDefinition Width="Auto" />
					<ColumnDefinition />
				</Grid.ColumnDefinitions>

				<Label Grid.Row="0" Content="Root Folder:"/>
				<TextBox Grid.Row="0" Grid.Column="1" Text="{Binding ActiveEntity.FolderPath}" />

                <CheckBox Grid.Row="1" Grid.Column="1" VerticalAlignment="Center" IsChecked="{Binding ActiveEntity.CleanPackageFolder}"
                          Margin="0,5,0,0">Clean Package Folder</CheckBox>
                <CheckBox Grid.Row="2" Grid.Column="1" VerticalAlignment="Center" IsChecked="{Binding ActiveEntity.CleanBuildFolders}"
                          Margin="0,5,0,0">Clean Build Folders</CheckBox>
                <CheckBox Grid.Row="3" Grid.Column="1" VerticalAlignment="Center" IsChecked="{Binding ActiveEntity.CleanBackupFolders}"
                          Margin="0,5,0,0">Clean Backup Folders</CheckBox>
                <CheckBox Grid.Row="4" Grid.Column="1" VerticalAlignment="Center" IsChecked="{Binding ActiveEntity.RemoveSourceControlLinks}"
                          Margin="0,5,0,0">Remove Source Control</CheckBox>
			</Grid>
		</Grid>

		<StackPanel Grid.Row="3" Orientation="Horizontal">
			<Button Width="100" Height="36" Command="{Binding CleanCommand}" Content="Clean"/>
		</StackPanel>
	</Grid>
</views:MvxWpfView>
